package com.dingyx.ps.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dingyx.ps.model.entity.EngineerDTO;
import com.dingyx.ps.model.po.EngineerListPO;
import com.dingyx.ps.model.vo.EngineerForApiVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EngineerMapper extends BaseMapper<EngineerDTO> {

    IPage<EngineerDTO> selectEngineersByEnterprise(IPage<EngineerDTO> page, @Param("po") EngineerListPO po);

    /**
     * < 人员导出查询 >
     * @Params [enterpriseId]
     * @return java.util.List<com.xianniu.yonggong.model.entity.EngineerDTO>
     * @author zym
     * @date 2021/5/13 17:56
     * @version v1.0.0
     */
    List<EngineerDTO> selectEngineersByEnterpriseToExport(Integer enterpriseId);

    Integer insertReturnId(EngineerDTO masterDTO);

    EngineerDTO selectByUserId(Integer userId);

    List<EngineerForApiVO> queryEngineerByUser();

    EngineerDTO selectByIDNumber(String idNumber);
}
